#include <iostream>
using namespace std;

int main()
{
    int fibo[17];
    fibo[0] = 1;
    fibo[2] = 2;
    for(int i=3; i<17; i++)
    {
        fibo[i] = fibo[i-1] + fibo[i-2];
        cout << fibo[i] << endl;
    }
    int m,n,p;
    while(cin >> m >> n >> p)
    {
        if(m == 0 && n == 0 && p == 0)
        {
            break;
        }

    }
}